package name.luoyong.shiro.shiroIniCustom.listener;

import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

public class MyHttpSessionListener implements HttpSessionListener {

	public void sessionCreated(HttpSessionEvent e) {
		HttpSession session = e.getSession();
		String sessionId = session.getId();
		SessionMap.put(sessionId, session);
	}

	public void sessionDestroyed(HttpSessionEvent e) {
		String sessionId = e.getSession().getId();
		SessionMap.remove(sessionId);
	}

}
